import { Tabbar, TabbarItem, Lazyload, Swipe, SwipeItem, Loading, Toast, Image as VanImage, Search, PullRefresh, List, Tab, Tabs, NavBar, Cell, CellGroup, Progress, Field, Button, Uploader, NoticeBar } from 'vant'

// 定义数组来保存所有需要用到的组件
const VantList = [Tabbar, TabbarItem, Lazyload, Swipe, SwipeItem, Loading, Toast, VanImage, Search, PullRefresh, List, Tab, Tabs, NavBar, Cell, CellGroup, Progress, Field, Button, Uploader, NoticeBar]

const VantPlugins = {
  // install 是一个方法，当外界use 这个组件的时候：就会调用本身的install 方法； 同时传vue 这个类方法；

  install: function (Vue) {
    VantList.forEach((item) => {
      Vue.use(item)
    })
  }
}
export default VantPlugins
